package com.zhouzhou.fastjava.query;

import com.google.common.collect.Lists;
import com.google.common.collect.Maps;

import java.util.List;
import java.util.Map;

public class QuerySetting {

    private List<QuerySortor> defaultOrderBys;

    private Map<String, QueryField> fields = Maps.newHashMap();

    public QuerySetting() {
    }

    public Map<String, QueryField> getFields() {
        return fields;
    }

    public void setFields(Map<String, QueryField> fields) {
        this.fields = fields;
    }

    public void setDefaultOrderBy(QuerySortor defaultOrderBy) {
        this.setDefaultOrderBys(Lists.newArrayList(defaultOrderBy));
    }

    public List<QuerySortor> getDefaultOrderBys() {
        return defaultOrderBys;
    }

    public void setDefaultOrderBys(List<QuerySortor> defaultOrderBys) {
        this.defaultOrderBys = defaultOrderBys;
    }

}